package com.cn.study005;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName Test5009.java
 * @Description
 * @createTime 2023年05月11日 18:03:00
 */
public class Test5009 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        String day=null;
        System.out.println("请输入星期几（数字1-7）：");
        int num =sc.nextInt();
        while(num!=0){
            if (num >=1 && num <= 7){
                switch (num){
                    case 1:
                        day = "MON";
                        break;
                    case 2:
                        day = "TUE";
                        break;
                    case 3:
                        day = "WED";
                        break;
                    case 4:
                        day = "THU";
                        break;
                    case 5:
                        day = "FRI";
                        break;
                    case 6:
                        day = "SAT";
                        break;
                    case 7:
                        day = "SUN";
                        break;
                }
                System.out.println("英文星期名为"+day);
                System.out.println("请输入星期几（数字1-7）：");
                num = sc.nextInt();
            }else{
                System.out.println("输入错误！请重新输入：");
                num = sc.nextInt();
            }
        }
        System.out.println("程序结束！");


    }
}
